/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class FloodSensor {
    static categoryCode = '010020007';

    static categoryName = '浸水传感器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return FloodSensor.categoryCode;
    }

    get categoryName() {
        return FloodSensor.categoryName;
    }

    getPreventRemoveAlarm(params) {
        return command({
            method: 'getPreventRemoveAlarm',
            methodId: 'pDrhEqe3',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWaterAlarm(params) {
        return command({
            method: 'getWaterAlarm',
            methodId: 'p1vFBb7V',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWaterAlarmSwitch(params) {
        return command({
            method: 'getWaterAlarmSwitch',
            methodId: 'pGox7xSS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWaterStatus(params) {
        return command({
            method: 'getWaterStatus',
            methodId: 'pZgRtiqL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setPreventRemoveAlarmOff(params) {
        return command({
            method: 'setPreventRemoveAlarmOff',
            methodId: 'pUPQOyzZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWaterAlarmOff(params) {
        return command({
            method: 'setWaterAlarmOff',
            methodId: 'ppAXijKd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWaterAlarmSwitch(params) {
        return command({
            method: 'setWaterAlarmSwitch',
            methodId: 'peHyqOUr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default FloodSensor;
